home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / disk / fill609.zip / FILL.DOC < prev    next >
Text File  |  1996-07-21  |  22KB  |  440 lines

  1. FILL.DOC                             1                         Revised: 07-20-96
  2.  
  3. The FILL program is designed to help you move or copy  files  off  a  hard  disk
  4. while reducing the amount of wasted space on the destination disks.  Internally,
  5. it does this by sorting the file names so the  largest  files  are  moved/copied
  6. first.  It then moves or copies whatever files can fit on the  floppy,  skipping
  7. any that can't.  Features:
  8.  
  9.   * Can either move or copy the files to the resulting location.
  10.   * Defaults to moving files if parameters passed in; prompts otherwise.
  11.   * Can go onto to multiple diskettes as desired, beeping if desired when
  12.     the next disk is expected.
  13.   * Can move the files in file name order or any of standard ordering
  14.     categories.
  15.   * Can be used to split up files which are too big to fit on a single disk.
  16.   * Can create a status/transaction file for you, showing what was copied/moved.
  17.   * Can label the output diskette, providing some patterns like sequence numbers
  18.     and dates which it will fill in for you.
  19.   * Some times useful for network transfers where standard MOVE command doesn't
  20.     always work.
  21.   * Can review and delete if desired any files which are already in the
  22.     output destination (e.g. already on the output diskette).
  23.   * Can reformat the whole disk if files are going to drive A or B.
  24.   * Can specify an input file ("@listfile") which contains the files to be
  25.     copied.
  26.  
  27. Limits:
  28.   * Routine can only process the first 500 files found.  It ignores the rest of
  29.     them.  If you're using /MOVE, you can always run it after some of the
  30.     files are gone and get the rest of them that way.
  31.   * Routine can only review for deletion the first 200 files in the output
  32.     location.
  33.   * Routine does not provide any cool features to fix up destination drives
  34.     that have surface errors.  If it encounters an error, it just beeps, gives
  35.     you an error message, and returns to DOS.
  36.   * Routine will not format the output diskette for you.
  37.   * Switching diskette densities is not recommended (e.g. intermixing 720K
  38.     diskettes with 1.44MB diskettes may cause errors).
  39.   * The routine's ability to continually test for a new diskette (/CONT) only
  40.     works if the diskette was formatted using DOS 4.0 or later.  That's the
  41.     version that puts volume sequence numbers on the diskettes.  One way to
  42.     insure this if you're using the newer versions of DOS is to do a
  43.     quick-reformat of your floppies whenever you'd normally do a DEL A:*.*.  I
  44.     do this with a QDR.BAT command that has the following:
  45.  
  46.         FORMAT %1 /Q /U /V:Bruce
  47.  
  48.     I then say "QDR A:" or "QDR B:".  It invokes an unconditional quick format
  49.     and applies a volume label on the diskette (to avoid the prompt).  If the
  50.     diskette does not have a sequence number, DOS tells you it can't be
  51.     quick-formatted and asks if it can do the full format instead.
  52.  
  53.  
  54.  
  55. FILL.DOC                             2                         Revised: 07-20-96
  56.  
  57. Note on copying/moving files to multiple diskettes:
  58.  
  59. I didn't think this was confusing but a lot of people don't seem  to  understand
  60. the technique of how files are moved to multiple diskettes.
  61.  
  62. Let's say you have six files:
  63.  
  64.         A_FILE.ZIP      500K
  65.         B_FILE.ZIP      300K
  66.         C_FILE.ZIP      650K
  67.         D_FILE.ZIP      200K
  68.         E_FILE.ZIP      450K
  69.         F_FILE.ZIP       25K
  70.  
  71. You're moving these files to blank 1.2MB diskettes  and  you  have  the  default
  72. /MULTI and /ON settings.  The program checks how much space is available on  the
  73. destination drive and comes back with 1.2MB.
  74.  
  75. It scans the input files and internally sorts them by descending size.  It  then
  76. looks for the biggest file in the file list and comes back  with  C_FILE.ZIP  at
  77. 650K.  Will this file fit on the  destination  drive?   Yes.   It  retains  that
  78. information, figures there is now 550K left on the output drive, and checks  for
  79. the second biggest file.  A_FILE.ZIP is 500K.  Will that also fit?  Yes.  So now
  80. there's 50K left.  The next biggest file is E_FILE.ZIP at 450K.  Will that  fit?
  81. Nope.  Check the next  biggest.   This  continues  until  it  reaches  the  file
  82. F_FILE.ZIP which is only 25K.  That's the biggest file  that  will  fit  in  the
  83. remaining 50K.
  84.  
  85. So it has three files to move.  What order should it move them?   You  have  /ON
  86. set so it's going to move them in file name order.  So it  moves  the  following
  87. files in the following order:
  88.  
  89.         A_FILE.ZIP      500K
  90.         C_FILE.ZIP      650K
  91.         F_FILE.ZIP       25K
  92.  
  93. Next diskette.  Same process.  This time it processes the remaining files:
  94.  
  95.         B_FILE.ZIP      300K
  96.         D_FILE.ZIP      200K
  97.         E_FILE.ZIP      450K
  98.  
  99.  
  100. Specifying parameters:
  101.  
  102. Parameters for this program can be set in the following ways.  The last  setting
  103. encountered always wins:
  104.   - Read from an *.INI file (see BRUCEINI.DOC file),
  105.   - Through the use of an environmental variable (SET FILL=whatever), or
  106.   - From the command line (see "Syntax" below)
  107.  
  108.  
  109.  
  110. FILL.DOC                             3                         Revised: 07-20-96
  111.  
  112. Syntax:
  113.  
  114.     FILL [ filespec | @listfile ] [ [ /TO ] drive: | [ /TO ] drive:\path\ ]
  115.       [ /MOVE | /COPY ] [ /PROMPT ] [ /Iinitfile | /-I ]
  116.       [ /OVERWRITE | /-OVERWRITE | /OVERSKIP | /OVERASK ]
  117.       [ /Ox | /O-x ] [ /Xfilespec ]... [ /WIPE ] [ /MULTI | /SINGLE ]
  118.       [ /SPLIT ] [ /FORCE ] [ /-LETTER ] [ /LABEL=label [ /START=n ] ]
  119.       [ /Frptfile [ /S+ | /S- | S* ] [ /CONT ] [ /TIME ]
  120.       [ /-BEEP ] [ /-LAST ] [ /FAKE ] [ /MONO ] [ /Q ] [ /? ]
  121.  
  122. where:
  123.  
  124. "filespec" is the file specification for what you want to move.  You can specify
  125. a drive and path and file wildcards if  necessary  (e.g.   "C:\TEMP\*.BAT")  but
  126. otherwise it defaults to your default drive and directory and takes "*.*".  Note
  127. that the program cannot handle any request for more than 500 files at a time.
  128.  
  129. "@listfile" allows you to have a variety of file specifications saved in a  text
  130. file named "listfile".  You cannot have more than 50 file specifications in this
  131. file (and you're still limited to  the  500  files  total).   Each  line  should
  132. consist of a file name with optional drive and path  information.   Blank  lines
  133. and lines beginning with semi-colons, colons, or quotes are ignored.
  134.  
  135. "drive:" or "drive:\path" (or "/TO  drive:"  or  "/TO  drive:\path")  tells  the
  136. routine what drive or path to move the files to.  In  many  cases,  the  routine
  137. doesn't really care whether the source specification  precedes  or  follows  the
  138. destination specification.  If either parameter ends with a colon  (e.g.   "A:")
  139. or slash (e.g. "C:\QB45\"), the routine  will  presume  that's  the  destination
  140. specification and the other one must be the  source  specification.   If  either
  141. parameter contains a wildcard,  the  routine  will  presume  that's  the  source
  142. specification and the other one must be the destination specification.  So "FILL
  143. A: *.BAS" is the same as "FILL *.BAS A:".  The  use  of  the  "/TO"  keyword  is
  144. optional unless the  specification  is  being  provided  in  an  initfile.   The
  145. original default is "A:" (or "/TO A:").
  146.  
  147. "/MOVE" says to move the files instead of copying them.  Initially  defaults  to
  148. "/MOVE" if other parameters are passed in  (e.g.  "FILL  *.ZIP"  will  move  the
  149. files) and  prompts  otherwise.   Check  out  BRUCEINI.DOC  for  information  on
  150. changing the defaults otherwise.
  151.  
  152. "/COPY" says to copy the files instead of moving them.   Initially  defaults  to
  153. "/MOVE" if other parameters are passed in  (e.g.  "FILL  *.ZIP"  will  move  the
  154. files) and prompts otherwise.
  155.  
  156. "/PROMPT" says to prompt for each filename before moving it.  Initially defaults
  157. to "/-PROMPT".
  158.  
  159. "/-PROMPT" says to not prompt for each file.  Initially defaults to "/-PROMPT".
  160.  
  161. "/Iinitfile" says to read an initialization file with the file name  "initfile".
  162. The file specification *must* contain a period.  Initfiles are described in  the
  163. BRUCEINI.DOC file.  Initially defaults to "/IFILL.INI".
  164.  
  165. "/-I" (or "/INULL") says to skip loading the initialization file.
  166.  
  167.  
  168. FILL.DOC                             4                         Revised: 07-20-96
  169.  
  170. "/OVERWRITE" says  to  overwrite  same-named  files  in  the  destination  path.
  171. Initially defaults to "/OVERSKIP".
  172.  
  173. "/-OVERWRITE" says to abort if any same-named files are found in the destination
  174. path.  Initially defaults to "/OVERSKIP".
  175.  
  176. "/OVERSKIP" says to skip any file that already exists in the  destination  path.
  177. The counts aren't accurate in this case.  This is initially the default.
  178.  
  179. "/OVERASK"  says  to  prompt  if  same-named  files  exist  in  the  destination
  180. directory.  Initially defaults to "/OVERSKIP".
  181.  
  182. "/Ox" and "/O-x" allow you to specify the copy order for the files.  "x" can  be
  183. one of the following:
  184.  
  185.         N = file name
  186.         D = file date and time
  187.         S = file size
  188.  
  189. If you precede the "x" with a dash ("-"), the  sort  will  be  done  in  reverse
  190. order.  Note that this parameter does not determine which files are  copied;  it
  191. only determines what order they are actually copied.  Since the order  that  the
  192. file tends to show up in a DOS DIR listing is  based  on  creation  order,  this
  193. sequence may be relevant  to  how  the  files  ultimately  show  up.   Initially
  194. defaults to "/ON".
  195.  
  196. "/Xfilespec" says to exclude  certain  filespecs  from  being  moved.   You  can
  197. specify up to 10 exclusion parameters but each must have  their  own  /Xfilespec
  198. statement.  For example, to move all files except those with  a  BAS  extension,
  199. you could say "FILL /X*.BAS".
  200.  
  201.  
  202. FILL.DOC                             5                         Revised: 07-20-96
  203.  
  204. "/WIPE" says that if the destination drive has files on it, prompt the user  for
  205. whether these files should be deleted or not.  Six sub-options show up  in  this
  206. case:
  207.  
  208.     Do *NOT* delete the x file(s)    Don't delete anything
  209.     List file(s)                     List the files but don't delete any of
  210.                                      them.  The user will be reprompted for
  211.                                      these four options after pressing a key.
  212.     Select file(s) to delete         List the files and allow the user to
  213.                                      select any to be deleted.  Keys:
  214.                                         * Cursor keys -- move among list
  215.                                         * Space       -- select that file
  216.                                         * Ctrl-Enter  -- select all files
  217.                                         * Ctrl-bs     -- deselect all files
  218.                                         * Enter       -- process those tagged
  219.                                         * Esc         -- skip processing
  220.                                      After pressing Enter, the selected files
  221.                                      will be deleted.  You will then get the
  222.                                      standard four prompts again.
  223.     Delete all file(s)               Delete all files in the specified
  224.                                      directory.  Subdirectory files will not
  225.                                      be deleted.
  226.     Reformat the diskette            If your output drive is either A or B,
  227.                                      the program will shell to DOS and execute
  228.                                      a "FORMAT d:" command.  This (and the
  229.                                      next) sub-option will result in the
  230.                                      subdirectories being eliminated, something
  231.                                      which the prior sub-options don't do for
  232.                                      you.
  233.     Quick-reformat the diskette      If your output drive is either A or B
  234.                                      and you're running under DOS 5.0 or higher,
  235.                                      the program will shell to DOS and execute
  236.                                      a "FORMAT d: /Q" command.
  237.  
  238. Initially defaults to "/-WIPE".
  239.  
  240. "/-WIPE" reverses /WIPE.  Initially defaults to "/-WIPE".
  241.  
  242. "/MULTI" says to go to a second disk if all of the files can't fit on the  first
  243. diskette.  Initially defaults to "/MULTI".
  244.  
  245. "/SINGLE" says process only one diskette at a time and to  not  prompt  for  the
  246. next diskette once the first gets filled up.  Initially defaults to "/MULTI".
  247.  
  248. "/SPLIT" says to split up large files which otherwise would not be able  to  fit
  249. onto the output disk.  For example, /SPLIT is useful when you have a 1.8MB  file
  250. that you're trying to copy or move to a 1.2MB or 1.44MB diskette.  Unless /FORCE
  251. is specified, files are split only if an empty output diskette would not be able
  252. to support the file; it will not split up a 800KB file just  because  the  1.2MB
  253. output diskette only has 600KB free.  /SPLIT must be used with a  specific  file
  254. request; not a wildcarded one.  Split files are given  the  file  extensions  of
  255. .x01, .x02, etc (see /LETTER vs /-LETTER options below for  explanation  of  the
  256. "x") until all necessary splitting is accomplished.  To put them  back  together
  257. again, use the DOS COPY copy with the /B option.  For example:
  258.  
  259.         COPY TEST.Z01/B+TEST.Z02/B TEST.ZIP
  260.  
  261.  
  262. FILL.DOC                             6                         Revised: 07-20-96
  263.  
  264. If (and ONLY if) you use something like Norton's DIRSORT command  so  the  files
  265. appear  in  sequence  in  your  directory  (and  not  because  of  any  DIR  /ON
  266. specification!), you can also concatenate using wildcards:
  267.  
  268.         COPY TEST.Z0*/B TEST.ZIP          [ONLY IF PHYSICALLY IN CORRECT ORDER]
  269.  
  270. Do NOT try this unless you're sure though, okay?  Note that if you  have  a  SET
  271. DIRCMD setting, the directory may look ordered when it's not.  Use  DIR  /-O  to
  272. check if necessary.
  273.  
  274. "/-SPLIT" reverses "/SPLIT" and is initially the default.
  275.  
  276. "/FORCE" says to split up files when /SPLIT is used even if the file is  smaller
  277. than the output disk would be.  So, if you have a 1.44MB  diskette  and  a  600K
  278. file, /FORCE will allow it to be split.  This is not  the  default  because  you
  279. typically do not want to split up every file; just the ones that are too big.
  280.  
  281. "/-FORCE" only allows files bigger than the output destination to be  split  up.
  282. This is initially the default.
  283.  
  284. "/LETTER" says that when /SPLIT is  specified,  use  the  first  letter  of  the
  285. original file extension when naming the split up file.   For  example,  TEMP.ZIP
  286. would become TEMP.Z01, TEMP.Z02, etc.  This does not affect files which  do  not
  287. get split.  Initially defaults to "/LETTER".
  288.  
  289. "/-LETTER" says that split up file  names  should  be  numeric  only.   TEMP.ZIP
  290. becomes TEMP.001, TEMP.002, etc.  This does not affect files which  do  not  get
  291. split.  Initially defaults to "/LETTER".
  292.  
  293. "/LABEL=label" specifies the volume label to be written to the output  disk.  By
  294. default, the label is not changed.  The label can be a quoted mixed-case string.
  295. It can contain several replaceable lowercase only parameters: "mm"  is  replaced
  296. with the two-digit month, "dd" is replaced  with  the  two-digit  day,  "yy"  is
  297. replaced with the two-digit year, and "n" or "nn" or "nnn" is  replaced  by  the
  298. sequence number of the disk.  All numeric fields are padded  to  the  left  with
  299. zeroes as necessary.  If the current date is January 20, 1996:
  300.  
  301.         /LABEL="BKyymmdd nn"
  302.  
  303. will label the first first "BK960120 01", the second  disk  "BK960120  02"  etc.
  304. Note that labels can be no longer than 11 characters in length.  All  characters
  305. except the replaceable parameters will be translated to uppercase characters.
  306.  
  307. "/START=n" specifies the first sequence number to use in place of "n", "nn",  or
  308. "nnn" in the /LABEL parameter.  Defaults to "/START=1".
  309.  
  310.  
  311. FILL.DOC                             7                         Revised: 07-20-96
  312.  
  313. "/Frptfile" specifies the name of a status report file to be created.  This file
  314. is a text file that reports on what's been processed  by  the  program.   If  it
  315. exists already, the file is appended to, not  overwritten.   A  sample  of  some
  316. lines from the file using the /S* option (which is not the default):
  317.  
  318.   FILL results for  /copy *.exe /ftest.txt /beep /wipe /s* /split
  319.   Being run on 01-20-1996 at 17:58:10
  320.  
  321.   Label        FileName    Date     Time                Size Operation
  322.  
  323.   TEST93 #01   AV.EXE       09/29/95 00:50:58          70,282 SKIP
  324.   TEST93 #01   BC.EXE       08/19/94 23:59:00         150,562 SKIP
  325.   TEST93 #01   BFIND.EXE    08/02/95 23:07:08          60,016 SKIP
  326.   TEST93 #01   VBDOS.EXE    08/19/94 23:59:00         555,520 COPY
  327.  
  328.   BRUCE        AV.EXE       09/29/93 00:50:58          70,282 SKIP
  329.   BRUCE        BC.EXE       08/19/92 23:59:00         150,562 SKIP
  330.   BRUCE        BFIND.EXE    08/02/93 23:07:08          60,016 SKIP
  331.  
  332. "/S+" specifies that the only files to be written to the status file  are  those
  333. files that actually get copied/moved.  This is the default.
  334.  
  335. "/S-" specifies that the only files to be written to the status file  are  those
  336. files that did not get copied/moved.  Since the  skipping  is  determination  is
  337. done with each disk, the status file may show the same file name as "SKIP"  over
  338. and over again.
  339.  
  340. "/S*" specifies that the status report should contain all files copied/moved  as
  341. well as skipped.  This can be a huge report.
  342.  
  343. "/CONT" is used if you want the routine to continually check your  floppy  drive
  344. to see when a new diskette has been put in and continue once it recognizes  this
  345. has happened.  The only time you'd have to press a key is if you  want  to  stop
  346. processing diskettes (in which case you'd press Escape).  This  option  is  only
  347. available if you're using DOS 4.0 or higher and only works for disks  that  have
  348. been formatted using DOS 4.0 or higher (it uses the serial number on the disk in
  349. order to determine that the disk has been replaced).  It  typically  won't  work
  350. for disks that are pre-formatted from a store or something  since  they  usually
  351. all have the same serial number.
  352.  
  353. "/-CONT" reverses "/CONT" and is initially the default.
  354.  
  355. "/TIME" says to show how much time it took for  the  transfers,  showing  you  a
  356. bytes copied/moved per second.
  357.  
  358. "/-TIME" says to skip the bytes per second information.  This is  initially  the
  359. default.
  360.  
  361. "/BEEP" says to beep once the routine is done  doing  its  thing  (a  high  tone
  362. followed by a low one).  It will also beep whenever it's time to stick in a  new
  363. diskette (a low tone followed by a high one).  Initially defaults to "/BEEP".
  364.  
  365. "/-BEEP" says to not beep upon completion.  Initially defaults to "/BEEP".
  366.  
  367.  
  368. FILL.DOC                             8                         Revised: 07-20-96
  369.  
  370. "/LAST" says to indicate when you are starting the last  disk  in  a  multi-disk
  371. set.  This doesn't apply to /SPLIT cases.  Some people consider the indicator to
  372. be rather unappealing on the screen so it's optional.   This  is  initially  the
  373. default.
  374.  
  375. "/-LAST" turns off the last-disk indicator in a multi-disk set.
  376.  
  377. "/FAKE" turns off the actual copying of  files.   It  basically  puts  you  into
  378. simulation mode so you can see what it would do, how many disks it  would  take,
  379. et cetera.
  380.  
  381. "/-FAKE" reverses "/FAKE" and is initially the default.
  382.  
  383. "/MONO" (or "/-COLOR") does  not  try  to  override  screen  colors.   Initially
  384. defaults to "/COLOR".
  385.  
  386. "/COLOR" (or "/-MONO") allows screen colors to be overridden.  This is initially
  387. the default.
  388.  
  389. "/Q" turns off the file-by-file status reporting.
  390.  
  391. "/?" or "/HELP" or "HELP" shows you the syntax for the command.
  392.  
  393.  
  394. Return codes:
  395.  
  396. FILL returns the following ERRORLEVEL codes:
  397.  
  398.         0 = no problems, all files copied
  399.         1 = no problems, but some files skipped since /-MULTI
  400.       251 = couldn't find @listfile file
  401.       252 = had DOS errors copying/moving the files (bad sectors found)
  402.       253 = had problems copying/moving the files
  403.       254 = no files found to copy/move
  404.       255 = syntax problems, or /? requested
  405.  
  406.  
  407.  
  408. FILL.DOC                             9                         Revised: 07-20-96
  409.  
  410. Author:
  411.  
  412. This program was written by Bruce Guthrie of Wayne Software.  It is free for use
  413. and redistribution provided relevant documentation is kept with the program,  no
  414. changes are made to the program or documentation, and it  is  not  bundled  with
  415. commercial programs or charged for separately.  People who need to bundle it  in
  416. for-sale packages must pay a $50 registration fee to  "Wayne  Software"  at  the
  417. following address.
  418.  
  419. Additional information about this and other Wayne Software programs can be found
  420. in the file BRUCEymm.DOC which should be included  in  the  original  ZIP  file.
  421. ("ymm" is replaced by the last digit of the year and the two digit month of  the
  422. release.  BRUCE512.DOC came out in December 1995.  This same  naming  convention
  423. is used in naming the ZIP file that this program was included in.) Comments  and
  424. suggestions can also be sent to:
  425.  
  426.                 Bruce Guthrie
  427.                 Wayne Software
  428.                 113 Sheffield St.
  429.                 Silver Spring, MD 20910
  430.  
  431.                 fax: (301) 588-8986
  432.                 e-mail: bguthrie@nmaa.org
  433.                 http://hjs.geol.uib.no/guthrie/
  434.  
  435. See BRUCEymm.DOC file for revision history.
  436.  
  437. Please provide an Internet e-mail address on all correspondence.
  438.  
  439. 
  440.